package com.atguigu.gmall.feign.cart;

import com.atguigu.gmall.model.cart.CartInfo;
import com.atguigu.gmall.model.product.SkuInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author dyqstart
 * @create 2021-08-17-19:09
 * @since 1.0.0
 */
@RequestMapping("/api/cart")
@FeignClient("service-cart")
public interface CartFeignClient {

    @GetMapping("/addToCart")
    CartInfo addToCart(@RequestParam("skuId") Long skuId,
                       @RequestParam("skuNum") Integer skuNum);


    //前端直接用，不调远程
//    @GetMapping("/listCart")
//    List<CartInfo> listCart();

    @GetMapping("/cartListChecked")
    List<CartInfo> getCartInfoListCheck();

}
